package com.yellowcong.controller;

import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.yellowcon.webssh.local.LocalTermClient;

@Controller
@RequestMapping("/web")
public class WebController {
	
	@RequestMapping(value="/local")
	public String local() {
		return "web/local";
	}
	
	@RequestMapping(value="/shell")
	public void shell(String cmd,HttpServletResponse response){
		
		//实例化client，处理请求
		LocalTermClient client = new LocalTermClient(response);
		client.exeCmd(cmd);
		
	}
}
